/*
 Navicat Premium Data Transfer

 Source Server         : root
 Source Server Type    : MySQL
 Source Server Version : 80200 (8.2.0)
 Source Host           : localhost:3306
 Source Schema         : shop

 Target Server Type    : MySQL
 Target Server Version : 80200 (8.2.0)
 File Encoding         : 65001

 Date: 06/06/2024 14:37:52
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for address
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
  `address_id` int NOT NULL AUTO_INCREMENT,
  `consumer_id` int DEFAULT NULL,
  `recipient_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '收件人姓名',
  `ecipient_phone_number` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '收件人电话',
  `province` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '省份',
  `city` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '城市',
  `district` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '区县',
  `detailed_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '详细地址',
  PRIMARY KEY (`address_id`),
  KEY `address_consumer_id` (`consumer_id`),
  CONSTRAINT `address_consumer` FOREIGN KEY (`consumer_id`) REFERENCES `consumer` (`consumer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='地址表';

-- ----------------------------
-- Records of address
-- ----------------------------
BEGIN;
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (3, 23, '尹慧敏', '7556 225066', 'sX171IDJi4', 'Birmingham', 'Gi7Q9tnLA2', '312 New Street');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (4, 19, '斉藤美羽', '21-670-5113', 'uzLRUwXMbm', 'Shanghai', 'vmJrajQLH0', '696 Middle Huaihai Road, Huangpu District');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (5, 10, '佐藤美羽', '3-1428-1761', '72rFQPd60g', 'Tokyo', '1YAeUaMz4v', '1-6-14, Marunouchi, Chiyoda-ku');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (6, 18, '蒋致远', '718-745-1973', 'wnJvo4opvC', 'Brooklyn', '1oVTAoz4ER', '662 1st Ave');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (7, 27, '太田七海', '614-405-6204', 'T6q5UKcBPr', 'Columbus', 'tS9HsT2hDI', '399 Tremont Road');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (8, 6, '高仲賢', '312-045-6226', 'HYmBGqVk98', 'Chicago', '2tarSRE5Y8', '371 North Michigan Ave');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (9, 27, '羅麗欣', '3-1514-1588', 'c8YZpIQqtd', 'Tokyo', 'J6H08jLMeF', '1-6-2, Marunouchi, Chiyoda-ku');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (10, 8, '毛天樂', '149-9121-7200', 'npZVKZCQ2m', 'Shenzhen', '48mxRFEj6F', '692 Jingtian East 1st St, Futian District');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (11, 11, '佐野光', '142-6380-5392', 'lB1Q30lBGT', 'Zhongshan', 'mjCR4RD16s', '945 Daxin S Rd, Daxin Shangquan, Tianhe Qu');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (12, 24, '苗榮發', '20-619-7523', 'J0uHJ0Ab1Z', 'Guangzhou', 'DQ4iPtReGV', '33 Jiangnan West Road, Haizhu District');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (13, 4, '金子大和', '3-0899-8842', 'pigrtWgLhZ', 'Tokyo', 'QyeqFbxdx6', '5-2-17 Higashi Gotanda, Shinagawa-ku ');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (14, 21, '常子韬', '178-2564-2501', 'f9mLZxxVSq', 'Chengdu', 'iqCGD9Mg4o', 'No. 840, Shuangqing Rd, Chenghua District');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (15, 20, '原蓮', '769-192-7928', 'lBuu8bJVvV', 'Dongguan', 'E3WjQNS0vl', '662 Kengmei 15th Alley');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (16, 13, '松井陸', '11-833-9640', 'LFnh9JJGsH', 'Sapporo', 'fwJ5Jmwa99', '5-4-15 Kikusui 3 Jo, Shiroishi Ward,');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (17, 5, '樊國明', '212-092-6715', 'mzxNzypxQD', 'New York', 'mbhdc6Aanp', '522 Wooster Street');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (18, 4, '田青雲', '838-357-1995', 'oV0tU8aGHz', 'Albany', 'Te9RyIqum4', '772 Broadway');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (19, 26, '森大和', '(116) 019 8513', 'VsyMAGTaQc', 'Leicester', 'WTgaizK2Le', '883 Hinckley Rd');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (20, 30, '汤岚', '7782 389536', '3sh5MGgI0b', 'Oxford', '5Ak3dgWvHL', '348 Abingdon Rd, Cumnor');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (21, 6, '小山一輝', '20-6832-3346', 'FLxUt7rixa', 'Guangzhou', '6wHHyZIUuB', '73 2nd Zhongshan Road, Yuexiu District');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (22, 24, '小林玲奈', '838-780-0952', 'eOaVeeLrzV', 'Albany', '4I8tR30MI4', '602 Central Avenue');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (23, 24, '原大輔', '52-857-9856', '98BBFqOLhX', 'Nagoya', '8q8dkYNpqN', '3-19-6 Shimizu, Kita Ward');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (24, 9, '太田美月', '838-242-3261', 'KBByOGp7lx', 'Albany', 'XwNxOOF813', '825 Lark Street');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (25, 11, '沈璐', '21-8634-1620', 'IxV1CCMpZz', 'Shanghai', 'xkoCWB6voo', '486 Hongqiao Rd., Xu Hui District');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (26, 9, '莫麗欣', '80-6297-3325', 'T1rYcQXWxI', 'Sapporo', 'X2lm0MoR6i', '5-19-14 Shinei 4 Jo, Kiyota Ward');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (27, 16, '松井大地', '838-964-2313', '3BZJzfO4pS', 'Albany', '3mfSdH121l', '416 State Street');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (28, 5, '董杰宏', '5213 892603', '1RWZDdV7Py', 'Manchester', '1D4djed5ft', '618 Mosley St');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (29, 23, '中島陸', '330-714-5333', 'cSMQiY46YD', 'Akron', 'KzzLs655G6', '932 West Market Street');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (30, 10, '小野大和', '90-6445-9902', 'PfzymWi9IU', 'Osaka', '5zn5IhFOuy', '1-7-4 Omido, Higashiosaka');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (31, 13, '廖杰宏', '755-1728-3894', 'ama9EpB8VN', 'Shenzhen', 'n6Kyay3dO8', '592 W Ring Rd, Buji Town, Longgang');
INSERT INTO `address` (`address_id`, `consumer_id`, `recipient_name`, `ecipient_phone_number`, `province`, `city`, `district`, `detailed_address`) VALUES (32, 7, '邹璐', '90-0111-1899', 'hp6aVzUiW2', 'Nagoya', '7xUSHZjKpE', '2 1-1715 Sekohigashi, Moriyama Ward');
COMMIT;

-- ----------------------------
-- Table structure for admin_info
-- ----------------------------
DROP TABLE IF EXISTS `admin_info`;
CREATE TABLE `admin_info` (
  `admin_id` int NOT NULL AUTO_INCREMENT,
  `account_name` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '管理员账号',
  `admin_password` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `role_type` int DEFAULT NULL COMMENT '角色类型：超级管理员、客服管理员',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `last_login_time` datetime DEFAULT NULL COMMENT '最后登录时间',
  PRIMARY KEY (`admin_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='管理员信息表';

-- ----------------------------
-- Records of admin_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for consumer
-- ----------------------------
DROP TABLE IF EXISTS `consumer`;
CREATE TABLE `consumer` (
  `consumer_id` int NOT NULL AUTO_INCREMENT,
  `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `consumer_name` varchar(14) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `default_address` varchar(66) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `register_time` datetime DEFAULT NULL,
  `email` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '邮件',
  PRIMARY KEY (`consumer_id`),
  UNIQUE KEY `phone_UNIQUE` (`phone`),
  UNIQUE KEY `email_UNIQUE` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of consumer
-- ----------------------------
BEGIN;
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (1, '614-361-1758', '河野凛', 'r9JjkEpEen', '252 Wicklow Road', '2002-03-14 04:11:13', 'riko@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (2, '(121) 866 7104', '伊藤玲奈', 'cT6Skx2Mji', '114 New Street', '2019-12-19 03:48:35', 'iren8@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (3, '70-5506-0911', '許心穎', 'FItXL4kbug', '3-19-11 Shimizu, Kita Ward', '2021-05-12 13:15:33', 'hsw@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (4, '(161) 563 3489', '魏晓明', '6bmPryXF87', '427 Portland St', '2018-10-18 12:45:38', 'wei01@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (5, '80-5808-8094', '野口葵', 'AT1CKb6RbC', '3-15-14 Ginza, Chuo-ku', '2014-10-21 20:25:18', 'aoinoguchi1@gmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (6, '212-759-8360', '山田悠人', 'G5SrWINNcT', '659 West Houston Street', '2019-04-21 20:06:55', 'yamyu@yahoo.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (7, '52-380-7562', '韩晓明', '0F4lfNAKUP', '1 3-803 Kusunokiajima, Kita Ward', '2009-09-03 02:02:39', 'hanxiaoming@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (8, '(121) 594 4774', '陶杰倫', 'FejqkGVS24', '217 Stephenson Street', '2018-06-09 00:40:20', 'tachie4@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (9, '70-9111-6636', '陳詩君', 'KncN7cAgmi', '5-4-13 Kikusui 3 Jo, Shiroishi Ward,', '2002-01-03 19:42:32', 'chansk@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (10, '330-209-1758', '山田美月', 'RjaZUxYrBA', '598 Collier Road', '2020-05-19 11:12:29', 'mitsukiyamada@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (11, NULL, '河凛', 'r9JjkEpEe', NULL, NULL, NULL);
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (12, '(1865) 87 0230', '田慧嫻', 'y9AURELsRU', '574 Park End St', '2006-04-29 15:00:36', 'waihan1226@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (13, '(161) 611 0368', '蘇曉彤', 'QoQ2Q8mqYh', '388 Sackville St', '2000-02-23 04:50:37', 'htso2006@gmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (14, '312-134-9606', '周麗欣', 'y9XWgWADhX', '572 Rush Street', '2021-05-28 01:24:49', 'laiyan3@mail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (15, '213-807-7299', '成心穎', '27vgYOt18d', '544 Alameda Street', '2016-01-16 17:23:46', 'shsumwi401@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (16, '718-441-0455', '唐子异', 'fUNBSZyAOG', '893 Flatbush Ave', '2000-02-26 10:41:09', 'tangziyi@gmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (17, '70-6618-5990', '謝志遠', 'sdCfLss9n1', '1-1-13 Deshiro, Nishinari Ward', '2003-06-21 19:47:14', 'cyts@mail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (18, '213-974-6057', '孟晓明', 'cC0bOngGIJ', '33 Grape Street', '2011-06-08 07:08:09', 'mengxi00@gmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (19, '(151) 044 7911', '餘思妤', '0l4JxCjjLs', '410 Hanover St', '2011-11-05 20:44:45', 'syyu@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (20, '21-3535-0754', '翁國榮', '17LWUbAIZA', '306 Middle Huaihai Road, Huangpu District', '2020-09-19 07:14:07', 'yungkwokwing@mail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (21, '330-054-9346', '夏云熙', 'R8bZAm0hCe', '595 Ridgewood Road', '2021-05-20 04:00:49', 'yunxi69@mail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (22, '614-753-7689', '餘仲賢', '2mw1HM3kEl', '321 Wicklow Road', '2011-07-10 21:03:12', 'cyyue54@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (23, '10-9642-5885', '林花', '0Ee29bcexY', '239 Dong Zhi Men, Dongcheng District', '2002-05-29 19:53:17', 'hayahana@icloud.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (24, '(121) 050 8990', '佐々木葵', 'Zq8FuSPEsz', '827 Stephenson Street', '2008-08-14 05:12:44', 'aosasak8@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (25, '330-424-1636', '雷震南', 'Qkkwtdni54', '944 Collier Road', '2019-06-22 20:11:33', 'zhennanlei@hotmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (26, '80-6128-8966', '何震南', 'D9U9ox5853', '13-3-15 Toyohira 3 Jo, Toyohira Ward', '2001-03-15 06:32:01', 'hezhen71@gmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (27, '(116) 327 3048', '山崎陸', 'HndVBRHimb', '582 Edward Ave, Braunstone Town', '2008-11-22 06:32:19', 'riku209@hotmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (28, '7194 583099', '馮惠敏', 'o5l24gmW7v', '347 Lower Temple Street', '2005-08-10 06:54:09', 'waimanfung@yahoo.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (29, '(1223) 90 5848', '何宇宁', 'TsyDF8J4NO', '402 The Pavilion, Lammas Field, Driftway', '2003-04-20 07:46:49', 'he1@gmail.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (30, '312-753-1585', '謝玲玲', 'yigS0zbNkJ', '147 Pedway', '2019-09-25 11:29:06', 'lltse@outlook.com');
INSERT INTO `consumer` (`consumer_id`, `phone`, `consumer_name`, `password`, `default_address`, `register_time`, `email`) VALUES (31, '52-552-3150', '钱子韬', 'L5yC1BcZxB', '6 4-20 Kawagishicho, Mizuho Ward', '2005-12-31 16:20:54', 'zitaoqia@gmail.com');
COMMIT;

-- ----------------------------
-- Table structure for order
-- ----------------------------
DROP TABLE IF EXISTS `order`;
CREATE TABLE `order` (
  `order_id` int NOT NULL AUTO_INCREMENT,
  `order_number` varchar(21) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '''订单编号,用于展示给用户的订单号码''',
  `total_amount` double DEFAULT '0',
  `consumer_id` int DEFAULT NULL,
  `order_status` int DEFAULT NULL COMMENT '''订单状态''',
  `payment_method` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `delivery_address` int DEFAULT NULL COMMENT '''收货地址''',
  `order_placed_time` datetime DEFAULT NULL COMMENT '''下单时间''',
  `payment_completed_time` datetime DEFAULT NULL COMMENT '''支付时间''',
  `shipment_time` datetime DEFAULT NULL COMMENT '''发货时间''',
  PRIMARY KEY (`order_id`),
  KEY `order_consumer_uid` (`consumer_id`),
  KEY `address_order` (`delivery_address`),
  CONSTRAINT `address_order` FOREIGN KEY (`delivery_address`) REFERENCES `address` (`address_id`),
  CONSTRAINT `order_consumer_id` FOREIGN KEY (`consumer_id`) REFERENCES `consumer` (`consumer_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of order
-- ----------------------------
BEGIN;
INSERT INTO `order` (`order_id`, `order_number`, `total_amount`, `consumer_id`, `order_status`, `payment_method`, `delivery_address`, `order_placed_time`, `payment_completed_time`, `shipment_time`) VALUES (1, 'CDmcGwff9L', 196.54, 1, 947, 'PayPal', 22, '2011-11-20 19:28:44', '2021-02-23 15:34:09', '2009-08-03 07:42:32');
COMMIT;

-- ----------------------------
-- Table structure for order_detail
-- ----------------------------
DROP TABLE IF EXISTS `order_detail`;
CREATE TABLE `order_detail` (
  `detail_id` int NOT NULL AUTO_INCREMENT,
  `order_id` int DEFAULT NULL,
  `product_id` int DEFAULT NULL,
  `purchase_quantity` int DEFAULT NULL COMMENT '购买数量',
  `unit_price` double DEFAULT NULL COMMENT '购买时单价',
  PRIMARY KEY (`detail_id`),
  KEY `order_detail_product_id` (`product_id`),
  KEY `order_detail_order_id` (`order_id`),
  CONSTRAINT `detail_product_id` FOREIGN KEY (`product_id`) REFERENCES `product` (`product_id`),
  CONSTRAINT `detiail_order_id` FOREIGN KEY (`order_id`) REFERENCES `order` (`order_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='订单详情表';

-- ----------------------------
-- Records of order_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `product_id` int NOT NULL AUTO_INCREMENT,
  `product_name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商品名称',
  `category_id` int DEFAULT NULL COMMENT '商品类别id',
  `price` double DEFAULT NULL COMMENT '价格',
  `stock_quantity` int DEFAULT NULL COMMENT '库存数量',
  `description` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商品描述',
  `image_url` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商品图片地址',
  `creation_time` datetime DEFAULT NULL COMMENT '创建时间',
  `last_update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `is_on_sale` int DEFAULT NULL COMMENT '是否上架',
  `brand` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '品牌',
  `store_id` int DEFAULT NULL,
  PRIMARY KEY (`product_id`),
  KEY `product_category_id` (`category_id`),
  KEY `product_store_id` (`store_id`),
  CONSTRAINT `product_category` FOREIGN KEY (`category_id`) REFERENCES `product_category` (`category_id`),
  CONSTRAINT `product_store_id` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商品信息表';

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (1, 'Cxerry', 7, 85, 976, 'UF8A7hQCkY', 'http://image.tinlokpa.jp/Food', '2010-06-20 22:10:02', '2017-04-02 21:46:54', 804, 'mnmLp7sxIK', 8);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (2, 'Apple se', 7, 964, 762, 'Y75cktsnLF', 'http://auth.anpan320.xyz/ComputersElectronics', '2011-07-20 14:42:29', '2012-01-29 16:17:07', 659, 'HHKuhCd07l', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (3, 'ultra-Rambuean', 6, 333, 111, 'kCoRSYwaho', 'https://www.dunnl.us/ToysGames', '2004-08-24 06:22:58', '2006-08-17 02:29:58', 970, '6zFZKKL5hS', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (4, 'Rambutan premium', 10, 561, 838, 'DYjL3SIR71', 'https://video.zhdai7.cn/Appliances', '2003-04-16 04:07:40', '2005-10-05 08:18:01', 566, '4Z4wYxlNMO', 5);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (5, 'Cherky pro', 10, 8, 858, 'xavFI4l2qC', 'http://image.uets1.biz/ToolsHomeDecoration', '2015-06-15 22:10:42', '2009-09-11 10:09:13', 766, 'JXLmr8jBsn', 2);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (6, 'Rambutan pi', 10, 884, 21, 'JimfardMWe', 'http://image.saititsuki1987.biz/Appliances', '2000-05-15 10:41:20', '2003-02-09 22:01:55', 539, 'ryAkJIcZv2', 4);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (7, 'Kiwi premium', 10, 189, 568, 'h1z0KdeycG', 'http://image.yunxi1.info/Food', '2012-04-30 21:02:52', '2008-03-17 16:09:31', 812, 'dXVrAtyKv6', 8);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (8, 'qaspberry', 10, 717, 181, 'wBqmKVDQzX', 'http://image.fongwk.com/BaggageTravelEquipment', '2014-01-05 03:07:47', '2020-01-18 12:00:11', 369, 'f8IFk713sp', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (9, 'Strawbeury', 10, 226, 856, 'ar2Qm8ciB2', 'https://video.daiyunxi.net/BaggageTravelEquipment', '2001-09-18 19:08:14', '2001-04-22 07:41:06', 608, '6DmS5U18tC', 8);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (10, 'orape', 8, 554, 108, '6KQyCaPMxi', 'http://video.cai5.net/ClothingShoesandJewelry', '2021-02-18 15:22:39', '2014-08-27 09:37:13', 563, 'RY55CNky6Z', 1);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (11, 'yiwi pi', 8, 942, 207, 'UeznjRNjNP', 'https://drive.wongliksun.xyz/ComputersElectronics', '2021-08-16 13:59:39', '2015-06-22 02:06:11', 631, 'rhscXMoNoW', 3);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (12, 'omni-Cherry', 10, 140, 317, 'kwCMxAoYjf', 'http://image.simmonsgeral222.org/FilmSupplies', '2023-09-29 20:14:11', '2011-08-12 20:11:16', 426, 'Wpud6Ax7XZ', 1);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (13, 'Strawberry', 8, 407, 217, 'SzAl3BLZf1', 'http://www.tamtingfung1978.biz/Food', '2010-11-19 00:13:11', '2004-03-20 21:18:57', 644, '4eD6dBFdXT', 8);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (14, 'Grtpe', 7, 461, 746, 'vXK2jyBEXT', 'https://image.xiongyunxi.net/HouseholdKitchenAppliances', '2011-10-26 02:42:55', '2009-04-12 08:33:57', 236, 'zdmq03OLKl', 5);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (15, 'Chefry', 8, 129, 73, 'GEb0WZkezV', 'https://image.kwyuen906.biz/ComputersElectronics', '2008-12-27 00:43:58', '2003-01-28 06:58:45', 66, 'wtXQg8GhE0', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (16, 'ambi-Mwngo', 10, 841, 656, 'XH2bkyNF9j', 'https://video.tszhin60.co.jp/Baby', '2008-05-11 11:36:38', '2022-02-18 04:54:09', 775, 'lajIZCRMZq', 7);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (17, 'Scrawberry', 7, 474, 508, 'GHO6X9FMSE', 'http://www.kanekoy.info/MusicalInstrument', '2014-04-08 09:01:02', '2006-07-31 02:16:29', 524, '32E41eY4gQ', 1);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (18, 'Raspberry', 10, 716, 138, 'XFFw1rBmYB', 'https://auth.takd106.cn/AutomotivePartsAccessories', '2000-10-21 08:25:25', '2003-09-28 18:56:13', 537, 'gYLHAxA20A', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (19, 'ambi-Ploots', 10, 977, 653, 'Ijge8TM9GU', 'https://drive.rhill63.com/ArtsHandicraftsSewing', '2002-12-21 13:30:33', '2003-08-31 11:40:30', 727, 'e4JFVeimu2', 6);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (20, 'ambi-grange', 7, 9, 764, 'rus8bt3ypl', 'http://auth.chuwaihan.org/VideoGames', '2002-11-21 16:19:42', '2001-11-10 03:52:47', 297, 'Jiw9EmLh7D', 4);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (21, 'Cherly', 6, 530, 797, 's4fVXZ7wxR', 'http://auth.sanq2.xyz/ClothingShoesandJewelry', '2014-04-16 18:28:11', '2007-05-25 21:07:08', 300, 'daYtP02JsR', 1);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (22, 'jiwi', 7, 328, 226, 'DElqq4pK5x', 'https://www.zhennan7.biz/VideoGames', '2011-03-16 21:28:07', '2005-01-30 16:15:17', 867, 'dawED22P37', 3);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (23, 'Orange', 9, 323, 163, 'Hb1mZxzhUJ', 'https://auth.hyfong.com/VideoGames', '2013-01-25 12:56:05', '2004-02-26 01:48:57', 325, 'tHTWZI4rZk', 6);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (24, 'Caerry premium', 7, 869, 261, 'vtF0aFWNu6', 'https://video.mingszec.us/ClothingShoesandJewelry', '2000-02-23 02:17:27', '2009-09-06 18:23:24', 764, 'E6zxaaYzb5', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (25, 'Apple', 7, 253, 883, 'yOTDShabEO', 'https://image.koohiutung.jp/IndustrialScientificSupplies', '2011-11-08 02:48:25', '2021-06-28 02:54:12', 694, 'KlF5NVuA6m', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (26, 'Raspberry', 10, 455, 267, 'MM2Ti6DdBd', 'https://www.yanshih62.co.jp/FilmSupplies', '2000-02-22 18:40:38', '2010-02-16 16:50:23', 63, 'TQQlZuDHQT', 2);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (27, 'tambutan', 10, 174, 44, '6LYTQMcUZR', 'http://drive.ahik1024.biz/HouseholdKitchenAppliances', '2012-09-07 07:24:21', '2017-12-23 17:03:33', 608, 'V6kMGbpbJv', 5);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (28, 'Pluzts', 9, 723, 476, '7zVZkUfoKN', 'https://drive.fujii715.jp/ToysGames', '2019-03-18 13:18:48', '2014-06-07 11:17:19', 338, 'uxZuPYjLbh', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (29, 'iManyo', 7, 392, 37, 't8oS9bqc4r', 'https://drive.saram7.biz/CellPhonesAccessories', '2011-05-21 16:06:12', '2003-07-22 13:24:13', 364, 'XMV76PZXpX', 4);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (30, 'Orhnge', 6, 388, 65, 'GVYUfbXFNf', 'http://drive.kmya7.us/HealthBabyCare', '2015-06-29 02:30:43', '2015-07-26 13:45:56', 519, 'fMthVIgrVw', 2);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (31, 'Rambutan', 9, 977, 449, 'AljnKte4lU', 'http://drive.itsuki723.org/CollectiblesFineArt', '2003-08-08 05:35:10', '2015-08-20 03:08:55', 66, 'YGBTDWlEF9', 5);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (32, 'aambutan core', 6, 681, 519, 'L3Xz1SDW19', 'http://drive.lwaiyee.jp/MusicalInstrument', '2004-03-27 23:22:39', '2001-09-23 18:18:09', 282, '5TWntyxoza', 10);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (33, 'grange', 10, 677, 795, 'leub4d0qeh', 'http://video.nichols402.jp/FilmSupplies', '2005-02-26 17:45:29', '2007-07-27 01:54:29', 931, 'p3ARBvPXAq', 7);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (34, 'Avple', 6, 204, 728, '2Pz1n59aUm', 'http://auth.xiaomingya201.xyz/PetSupplies', '2013-04-01 22:54:19', '2011-07-12 14:44:57', 757, 'UXBJyr6D6e', 9);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (35, 'Kiwi air', 9, 33, 494, 'nKGbNgO1KO', 'http://video.djialun.co.jp/AppsGames', '2020-04-30 19:13:53', '2020-09-08 23:08:39', 141, 'p8P68A7kF0', 6);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (36, 'ultra-Makgo', 6, 83, 557, 'W54LGZeniV', 'https://image.kminato5.xyz/PetSupplies', '2016-07-15 17:24:41', '2021-12-25 12:00:09', 906, 'FgR3cjFTih', 6);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (37, 'Grape mini', 6, 107, 540, '3pJeVhjfLh', 'http://drive.sxiaoming.biz/ToolsHomeDecoration', '2016-09-13 04:59:13', '2017-02-22 01:40:46', 769, 'cQrPSszm2u', 1);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (38, 'ultra-Rambutan', 9, 605, 40, 'Aa0KPYoY4H', 'https://video.kobaydaichi8.jp/CenturionGardenOutdoor', '2014-04-27 12:52:45', '2001-11-07 23:57:11', 712, 'x2rfSroks3', 10);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (39, 'Pluots elite', 10, 932, 849, '3UZH4oKz5m', 'http://video.lukong.com/BeautyPersonalCare', '2007-08-15 13:58:05', '2019-04-19 22:46:02', 968, '1sAvqX8pTq', 3);
INSERT INTO `product` (`product_id`, `product_name`, `category_id`, `price`, `stock_quantity`, `description`, `image_url`, `creation_time`, `last_update_time`, `is_on_sale`, `brand`, `store_id`) VALUES (40, 'ambi-Raspberry', 8, 770, 866, 'yIHPJUnwQI', 'https://drive.yota70.us/CellPhonesAccessories', '2004-07-26 21:22:02', '2002-06-13 22:43:15', 951, 'rmwCz5nLH0', 1);
COMMIT;

-- ----------------------------
-- Table structure for product_category
-- ----------------------------
DROP TABLE IF EXISTS `product_category`;
CREATE TABLE `product_category` (
  `category_id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '类名',
  PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商品类别表';

-- ----------------------------
-- Records of product_category
-- ----------------------------
BEGIN;
INSERT INTO `product_category` (`category_id`, `category_name`) VALUES (6, 'Nakagawa Ayano');
INSERT INTO `product_category` (`category_id`, `category_name`) VALUES (7, 'Koon Wai Yee');
INSERT INTO `product_category` (`category_id`, `category_name`) VALUES (8, 'Wang Zhennan');
INSERT INTO `product_category` (`category_id`, `category_name`) VALUES (9, 'Song Lan');
INSERT INTO `product_category` (`category_id`, `category_name`) VALUES (10, 'Kimura Ayato');
COMMIT;

-- ----------------------------
-- Table structure for shopping_cart
-- ----------------------------
DROP TABLE IF EXISTS `shopping_cart`;
CREATE TABLE `shopping_cart` (
  `shopping_cart_id` int NOT NULL AUTO_INCREMENT,
  `consumer_id` int DEFAULT NULL,
  `number` int DEFAULT NULL,
  `selected` int DEFAULT NULL,
  `add_to_cart_time` datetime DEFAULT NULL,
  `last_update_time` datetime DEFAULT NULL,
  `product_id` int DEFAULT NULL,
  PRIMARY KEY (`shopping_cart_id`),
  KEY `consumer_uid` (`consumer_id`),
  KEY `cart_product_id` (`product_id`),
  CONSTRAINT `cart_consumer_id` FOREIGN KEY (`consumer_id`) REFERENCES `consumer` (`consumer_id`),
  CONSTRAINT `cart_product_id` FOREIGN KEY (`product_id`) REFERENCES `product` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- ----------------------------
-- Records of shopping_cart
-- ----------------------------
BEGIN;
INSERT INTO `shopping_cart` (`shopping_cart_id`, `consumer_id`, `number`, `selected`, `add_to_cart_time`, `last_update_time`, `product_id`) VALUES (2, 1, 3, 1, '2024-06-06 09:34:07', '2024-06-06 10:40:50', 2);
COMMIT;

-- ----------------------------
-- Table structure for store
-- ----------------------------
DROP TABLE IF EXISTS `store`;
CREATE TABLE `store` (
  `store_id` int NOT NULL AUTO_INCREMENT,
  `store_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '商家名称',
  `contact_person_name` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系人姓名',
  `contact_phone_number` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系电话',
  `contact_email` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '联系邮箱',
  `store_status` int DEFAULT NULL COMMENT '商家状态',
  `join_time` datetime DEFAULT NULL COMMENT '入驻时间',
  `verification_status` int DEFAULT NULL COMMENT '审核状态',
  `bank_account_info` varchar(19) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '银行账号信息，用于提现',
  `commission_rate` double DEFAULT NULL COMMENT '佣金比例',
  PRIMARY KEY (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商家表';

-- ----------------------------
-- Records of store
-- ----------------------------
BEGIN;
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (1, 'Amber Wilson', '中野舞', '10-809-8317', 'amberw@yahoo.com', 1, '2017-03-06 05:50:34', 1, 'NdndCg6Gb9', 460.45);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (2, 'Song Xiaoming', '新井大和', '718-572-4662', 'xiaomings@mail.com', 1, '2006-08-19 18:14:39', 1, 'CjMNTkVaO0', 258.39);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (3, 'Carolyn Diaz', '洪惠敏', '80-0090-0645', 'carolyndi41@hotmail.com', 1, '2002-03-14 18:31:47', 1, 'OdOvoFaBWi', 67.49);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (4, 'Fan Kwok Wing', '中村美羽', '130-8284-5130', 'fkwo@outlook.com', 1, '2019-10-26 08:19:39', 1, 'Z3wX437cxA', 895.27);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (5, 'Hazel White', '阿部美羽', '90-6455-1018', 'whaze@outlook.com', 1, '2021-06-26 16:55:09', 1, 'UcCjTtGoFt', 861.44);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (6, 'Theresa Roberts', '鄭小慧', '90-2265-7370', 'thro1122@gmail.com', 1, '2009-02-09 03:07:55', 1, 'U4HhMrMuOM', 582.6);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (7, 'Joan Medina', '藤家明', '718-585-5343', 'joanmedi8@icloud.com', 1, '2014-12-27 22:55:26', 1, 'ttMCwJTe8T', 406.64);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (8, 'Maeda Riku', '中村瑛太', '7416 443320', 'riku409@outlook.com', 1, '2002-09-25 02:57:27', 1, 'u6rXvrODqq', 549.28);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (9, 'Joanne Mitchell', '邱力申', '5440 641596', 'joannmi@icloud.com', 1, '2015-07-13 14:52:34', 1, 'Q859y1zXVO', 385.27);
INSERT INTO `store` (`store_id`, `store_name`, `contact_person_name`, `contact_phone_number`, `contact_email`, `store_status`, `join_time`, `verification_status`, `bank_account_info`, `commission_rate`) VALUES (10, 'Miura Shino', '小野海斗', '614-281-5329', 'miurashino@gmail.com', 1, '2005-01-12 10:08:28', 1, 'pdCpOPGEA4', 775.74);
COMMIT;

-- ----------------------------
-- Table structure for store_user
-- ----------------------------
DROP TABLE IF EXISTS `store_user`;
CREATE TABLE `store_user` (
  `store_user_id` int NOT NULL,
  `store_id` int DEFAULT NULL COMMENT '商家id',
  `role` int DEFAULT NULL COMMENT '角色（店长、运营人员）\n',
  `consumer_id` int DEFAULT NULL,
  PRIMARY KEY (`store_user_id`),
  KEY `store_user-store_id` (`store_id`),
  KEY `consumer_id` (`consumer_id`),
  CONSTRAINT `consumer_id` FOREIGN KEY (`consumer_id`) REFERENCES `consumer` (`consumer_id`),
  CONSTRAINT `store_user_id` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商家用户表';

-- ----------------------------
-- Records of store_user
-- ----------------------------
BEGIN;
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (1, 10, 1, 10);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (2, 10, 2, 10);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (3, 2, 1, 3);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (4, 8, 1, 11);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (5, 3, 1, 6);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (6, 4, 2, 6);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (7, 10, 2, 3);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (8, 10, 2, 10);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (9, 6, 1, 2);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (10, 3, 1, 8);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (11, 5, 2, 8);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (12, 3, 1, 5);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (13, 8, 2, 10);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (14, 3, 1, 4);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (15, 5, 2, 3);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (16, 5, 2, 4);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (17, 10, 2, 4);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (18, 4, 1, 6);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (19, 10, 2, 2);
INSERT INTO `store_user` (`store_user_id`, `store_id`, `role`, `consumer_id`) VALUES (20, 2, 2, 5);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
